<template>
  <div class="view-page">
    <div class="main-content">
      <router-view></router-view>
    </div>
    <dialogs v-if="dialogshow" :type="dialogtype"></dialogs>
  </div>
</template>
<script type="text/javascript">
  import {leftSlide} from '@/components'
  import dialogs from '@/components/dialog/index.vue'
  import bus from '@/eventBus/bus'

  export default {
    name: 'page',
    data() {
      return {
        dialogshow: false,
        dialogtype: 'inquire'
      }
    },
    mounted() {
      let _this = this
      bus.$on('dialogshow', function (e) {
        _this.dialogshow = e.status
        _this.dialogtype = e.type
      })
    },
    components: {
      leftSlide,
      dialogs
    }
  }
</script>
